package com.laowang.project.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.laowang.framework.aspectj.lang.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * 网页端用户对象 web_user
 *
 * @author laowang
 * @date 2023-10-16
 */
@NoArgsConstructor
@Data
public class WebUser implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @ApiModelProperty(value = "${comment}", required = false)
    private Integer userId;

    /**
     * 账号
     */
    @Excel(name = "账号")
    @ApiModelProperty(value = "账号", required = false)
    private String name;

    /**
     * 密码
     */
    @Excel(name = "密码")
    @NotBlank(message = "密码不能为空")
    @ApiModelProperty(value = "密码", required = false)
    private String password;

    @NotBlank(message = "重复密码不能为空")
    @Transient
    private String password1;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间", required = false)
    private Date created;

    /**
     * 收货地址
     */
    @Excel(name = "收货地址")
    @ApiModelProperty(value = "收货地址", required = false)
    private String address;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    @Excel(name = "手机号")
    @ApiModelProperty(value = "手机号", required = false)
    private String phone;

    @Transient
    private List<Integer> ids;

}
